package com.ysu.demo.Local;

/**
 * @author ：lhw
 * @date ：Created in 2019/9/8 11:38
 */
public class MyLocal {
    private final static ThreadLocal<Integer> requestHolder = new ThreadLocal<>();
    public static void addId(Integer id) {
        requestHolder.set(id);
    }

    public static Integer getId() {
        return requestHolder.get();
    }

    public static void remove() {
        requestHolder.remove();
    }
}
